home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 7839 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: news.halcyon.com!usenet
  2. From: normanb@halcyon.com (Norm Bryar)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: C++ gurus, I have a question for you!
  5. Date: Mon, 19 Feb 1996 18:33:06 GMT
  6. Organization: Northwest Nexus Inc.
  7. Message-ID: <4gafnv$84m@news.halcyon.com>
  8. References: <31281804.687F@iglou.com>
  9. NNTP-Posting-Host: blv-pm12-ip19.halcyon.com
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. This sounds alittle strange; what exactly is it you're trying to
  13. accomplish?  Variable a isn't a global, I assume.  If it's an
  14. automatic, you know if it's been initialized because you know whether
  15. the flow of control has entered the { } enclosing the variable
  16. definition.  You're trying to decide whether to define a local 'a'
  17. based on whether another 'a' exists or not within an outer namespace?
  18.  
  19.                     --Norm 
  20.  
  21.  
  22. "Abe L. Getchell" <panther@iglou.com> wrote:
  23.  
  24. >How is it possible to check if a variable has been
  25. >initialized yet?  If I do 'if ( !a ) { int a = 1 }' I get
  26. >an error message.  Please, any help would be great.  Reply
  27. >to the group or in mail.  Thanks in advance!
  28.  
  29. >Abe L. Getchell
  30.  
  31.  
  32.